package com.cloud.consumers.controller;

import com.cloud.consumers.model.User;
import com.cloud.consumers.remote.UserRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    UserRemote userRemote;

    @RequestMapping("/users")
    public List<User> users(){
       return userRemote.users();
    }
}
